home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #6 / Amiga Plus CD - 2004 - No. 06.iso / AmigaPlus / Begleitmaterial / 50Tools / Grafik / PerfectPaint / rexx / Anim / PPAnim.rx < prev    next >
Text File  |  2001-10-01  |  681b  |  61 lines

  1. /*     arexx Script 
  2. */
  3.  
  4.     options results
  5.     parse ARG Port b
  6.     
  7.     ADDRESS value Port
  8.  
  9.     pp_GetDepth
  10.     D=result
  11.     pp_GetWidth
  12.     W=result
  13.     pp_GetHeight
  14.     H=result
  15.  
  16.     pp_CountFrames
  17.     count=result
  18.     IF count<2 then DO
  19.         pp_Warn 'Make*an*Anim*first.'
  20.         EXIT
  21.     END
  22.  
  23.     pp_GetCurrentBrush
  24.     B0=result
  25.  
  26.     pp_FindEmptyBrush
  27.     Brush=result
  28.     if Brush=-1 then DO
  29.         pp_Warn "can't*find*empty|Brush."
  30.         EXIT        
  31.     END
  32.     pp_SetBrush Brush    
  33.  
  34.     pp_EffectOff
  35.  
  36.     pp_GotoFrame count
  37.     pp_AddFrames (count-2)
  38.     C=count+(count-2)
  39.  
  40.     j=0
  41.     DO i=(count-1) to 2 by -1
  42.         pp_GotoFrame i
  43.         pp_PickBrush 0 0 w h 1
  44.         pp_GotoFrame (count+1+j) 
  45.         pp_Plot w/2 h/2        
  46.         j=j+1
  47.     END
  48.  
  49.  
  50.     pp_GotoFrame 1
  51.  
  52.     pp_FreeBrush
  53.     pp_SetBrush B0
  54.     
  55.     EXIT
  56.     
  57.  
  58.  
  59.     
  60.  
  61.